<template>
  <div class="bigScreen">
    <Scale-box>
      <div class="main-wraper">
        <div class="mainTop">
          <img class="topBanner" src="../../assets/images/topc.png" />
          <div class="mainTitle">可视化大屏1</div>
          <div class="logout" @click="fullscreen()">关闭</div>
        </div>

        <div class="container">
          <!-- left -->
          <div class="leftCont">
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <div class="contTitle">出土垃圾类型</div>
                <charts1 style="transform: translateY(-30px);"></charts1>
              </div>
            </div>
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <!-- <div class="contTitle">消纳场所</div> -->
                <charts2 style="transform: translateY(10px);"></charts2>
              </div>
            </div>
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <div class="contTitle">罚款金额</div>
                <charts3 style="transform: translate(-40px,-20px);"></charts3>
              </div>
            </div>
          </div>

          <!-- center -->
          <div class="map">
            <chartsmap></chartsmap>
          </div>

          <!-- right -->
          <div class="rightCont">
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <div class="contTitle">项目违章类型</div>
                <charts4></charts4>
              </div>
            </div>
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <div class="contTitle">项目违章类型</div>
                <charts5 style="transform: translateY(-30px);"></charts5>
              </div>
            </div>
            <div class="contBox">
              <img class="contBanner" src="../../assets/images/kuang.png" />
              <div class="conts">
                <div class="contTitle">处置场所</div>
                <charts6></charts6>
              </div>
            </div>
          </div>
        </div>
      </div>
    </Scale-box>
  </div>
</template>
  
<script>
import chartsmap from "./map.vue";
import ScaleBox from "./ScaleBox.vue";
import charts1 from "./charts/charts1.vue";
import charts2 from "./charts/charts2.vue";
import charts3 from "./charts/charts3.vue";
import charts4 from "./charts/charts4.vue";
import charts5 from "./charts/charts5.vue";
import charts6 from "./charts/charts6.vue";
export default {
  components: {
    ScaleBox,
    chartsmap,
    charts1,
    charts2,
    charts3,
    charts4,
    charts5,
    charts6
  },
  data() {
    return {
      // 窗口放大
      winfull: {
        full: false
      }
    };
  },
  mounted() {
    this.fullscreen();
  },
  methods: {
    // 全屏、退出全屏事件
    fullscreen() {
      // 页面的tabber和header隐藏或显示
      this.winfull.full = !this.winfull.full;
      if (this.winfull.full) {
        this.$store.dispatch("app/toggleSideBarHide", true);
        this.$store.dispatch("settings/setNavbar_tags", false);
      } else {
        this.$store.dispatch("app/toggleSideBarHide", false);
        this.$store.dispatch("settings/setNavbar_tags", true);
        setTimeout(() => {
          this.$router.go(-1);
        }, 500);
      }
    }
  }
};
</script>
  
  <style lang="scss" scoped>
.leftCont {
  margin-left: 20px;
}
.rightCont {
  margin-right: 20px;
}
.bigScreen {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  background-image: url("../../assets/images/banner.png");
  background-size: cover;
  .main-wraper {
    // width: 1080px;
    width: 100%;
    height: 1920px;
    margin: 0 auto;
    // background-size: cover;
    // box-sizing:border-box;
    // background-image: url('../../assets/images/login-background.jpg');
    .container {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
      .leftCont,
      .rightCont {
        .contBox {
          width: 400px;
          height: 300px;
          margin-bottom: 20px;
          position: relative;
          .contBanner {
            position: absolute;
            width: 100%;
            height: 100%;
          }
          .conts {
            color: #fff;
            padding: 12px;
            font-size: 24px;
            .contTitle {
              font-size: 18px;
              color: rgb(54 163 247);
            }
          }
        }
      }
      .map {
        width: 55%;
        // background: #ccc;
        height: 800px;
      }
    }
    .mainTop {
      width: 100%;
      height: 80px;
      position: relative;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      .topBanner {
        width: 50%;
        height: 100%;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
      }
      .mainTitle {
        position: absolute;
        font-size: 36px;
        color: #fff;
        width: 100%;
        line-height: 80px;
        text-align: center;
      }
      .logout {
        position: absolute;
        top: 0;
        right: 24px;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
      }
    }
  }
}
</style>
  